from .model import User
from .enums import SysUserEnum
from .service import UserService

async def init_superuser():
    user = await User.exists()
    if not user:
        await UserService.create_user(
            User(
                username='admin',
                password='Abc123456.',
                user_type=SysUserEnum.SUPERUSER.value,
                created_by='admin',
                updated_by='admin'
            )
        )